#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

void findLongestWord(char* str) {
    char longestWord[50];
    char* token;
    char* longest = NULL;
    token = strtok(str, " ");
    while (token != NULL) {
        if (longest == NULL || strlen(token) > strlen(longest)) {
            longest = token;
        }
        token = strtok(NULL, " ");
    }
    strcpy(longestWord, longest);
    printf("The longest word in the string is: %s\n", longestWord);
}
